package com.workerhelping.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.workerhelping.dao.NoticeDao;
import com.workerhelping.po.Notice;
import com.workerhelping.service.NoticeService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeDao, Notice> implements NoticeService {
    @Override
    public List<Notice> listNotice() {
        QueryWrapper<Notice> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("id", "title","create_date");
        List<Notice> notices = baseMapper.selectList(queryWrapper);
        return notices;
    }
}
